Optimal. Leaf size=161 \[ -\frac{5 \sqrt{a+i a \tan (c+d x)}}{3 a d \tan ^{\frac{3}{2}}(c+d x)}+\frac{1}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}+\frac{7 i \sqrt{a+i a \tan (c+d x)}}{3 a d \sqrt{\tan (c+d x)}}-\frac{\left (\frac{1}{2}-\frac{i}{2}\right ) \tanh ^{-1}\left (\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{\sqrt{a} d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.409143, antiderivative size = 161, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.179, Rules used = {3559, 3598, 12, 3544, 205} \[ -\frac{5 \sqrt{a+i a \tan (c+d x)}}{3 a d \tan ^{\frac{3}{2}}(c+d x)}+\frac{1}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}+\frac{7 i \sqrt{a+i a \tan (c+d x)}}{3 a d \sqrt{\tan (c+d x)}}-\frac{\left (\frac{1}{2}-\frac{i}{2}\right ) \tanh ^{-1}\left (\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{\sqrt{a} d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3559
Rule 3598
Rule 12
Rule 3544
Rule 205
Rubi steps
\begin{align*} \int \frac{1}{\tan ^{\frac{5}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}} \, dx &=\frac{1}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}+\frac{\int \frac{\sqrt{a+i a \tan (c+d x)} \left (\frac{5 a}{2}-2 i a \tan (c+d x)\right )}{\tan ^{\frac{5}{2}}(c+d x)} \, dx}{a^2}\\ &=\frac{1}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}-\frac{5 \sqrt{a+i a \tan (c+d x)}}{3 a d \tan ^{\frac{3}{2}}(c+d x)}+\frac{2 \int \frac{\sqrt{a+i a \tan (c+d x)} \left (-\frac{7 i a^2}{4}-\frac{5}{2} a^2 \tan (c+d x)\right )}{\tan ^{\frac{3}{2}}(c+d x)} \, dx}{3 a^3}\\ &=\frac{1}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}-\frac{5 \sqrt{a+i a \tan (c+d x)}}{3 a d \tan ^{\frac{3}{2}}(c+d x)}+\frac{7 i \sqrt{a+i a \tan (c+d x)}}{3 a d \sqrt{\tan (c+d x)}}+\frac{4 \int -\frac{3 a^3 \sqrt{a+i a \tan (c+d x)}}{8 \sqrt{\tan (c+d x)}} \, dx}{3 a^4}\\ &=\frac{1}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}-\frac{5 \sqrt{a+i a \tan (c+d x)}}{3 a d \tan ^{\frac{3}{2}}(c+d x)}+\frac{7 i \sqrt{a+i a \tan (c+d x)}}{3 a d \sqrt{\tan (c+d x)}}-\frac{\int \frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{\tan (c+d x)}} \, dx}{2 a}\\ &=\frac{1}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}-\frac{5 \sqrt{a+i a \tan (c+d x)}}{3 a d \tan ^{\frac{3}{2}}(c+d x)}+\frac{7 i \sqrt{a+i a \tan (c+d x)}}{3 a d \sqrt{\tan (c+d x)}}+\frac{(i a) \operatorname{Subst}\left (\int \frac{1}{-i a-2 a^2 x^2} \, dx,x,\frac{\sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{d}\\ &=-\frac{\left (\frac{1}{2}-\frac{i}{2}\right ) \tanh ^{-1}\left (\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{\sqrt{a} d}+\frac{1}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}-\frac{5 \sqrt{a+i a \tan (c+d x)}}{3 a d \tan ^{\frac{3}{2}}(c+d x)}+\frac{7 i \sqrt{a+i a \tan (c+d x)}}{3 a d \sqrt{\tan (c+d x)}}\\ \end{align*}
Mathematica [A] time = 1.67475, size = 159, normalized size = 0.99 \[ \frac{i \left (-18 e^{2 i (c+d x)}+7 e^{4 i (c+d x)}+3 e^{i (c+d x)} \left (-1+e^{2 i (c+d x)}\right )^{3/2} \tanh ^{-1}\left (\frac{e^{i (c+d x)}}{\sqrt{-1+e^{2 i (c+d x)}}}\right )+3\right )}{3 \sqrt{2} d \left (-1+e^{4 i (c+d x)}\right ) \sqrt{\frac{a e^{2 i (c+d x)}}{1+e^{2 i (c+d x)}}} \sqrt{\tan (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.072, size = 401, normalized size = 2.5 \begin{align*}{\frac{1}{12\,ad \left ( -\tan \left ( dx+c \right ) +i \right ) ^{2}}\sqrt{a \left ( 1+i\tan \left ( dx+c \right ) \right ) } \left ( 3\,i\sqrt{2}\ln \left ( -{\frac{1}{\tan \left ( dx+c \right ) +i} \left ( -2\,\sqrt{2}\sqrt{-ia}\sqrt{a\tan \left ( dx+c \right ) \left ( 1+i\tan \left ( dx+c \right ) \right ) }+ia-3\,a\tan \left ( dx+c \right ) \right ) } \right ) \left ( \tan \left ( dx+c \right ) \right ) ^{4}a+36\,\sqrt{a\tan \left ( dx+c \right ) \left ( 1+i\tan \left ( dx+c \right ) \right ) }\sqrt{-ia} \left ( \tan \left ( dx+c \right ) \right ) ^{2}-3\,i\sqrt{2}\ln \left ( -{\frac{1}{\tan \left ( dx+c \right ) +i} \left ( -2\,\sqrt{2}\sqrt{-ia}\sqrt{a\tan \left ( dx+c \right ) \left ( 1+i\tan \left ( dx+c \right ) \right ) }+ia-3\,a\tan \left ( dx+c \right ) \right ) } \right ) \left ( \tan \left ( dx+c \right ) \right ) ^{2}a+28\,i\sqrt{a\tan \left ( dx+c \right ) \left ( 1+i\tan \left ( dx+c \right ) \right ) }\sqrt{-ia} \left ( \tan \left ( dx+c \right ) \right ) ^{3}+6\,\sqrt{2}\ln \left ( -{\frac{-2\,\sqrt{2}\sqrt{-ia}\sqrt{a\tan \left ( dx+c \right ) \left ( 1+i\tan \left ( dx+c \right ) \right ) }+ia-3\,a\tan \left ( dx+c \right ) }{\tan \left ( dx+c \right ) +i}} \right ) \left ( \tan \left ( dx+c \right ) \right ) ^{3}a+8\,\sqrt{a\tan \left ( dx+c \right ) \left ( 1+i\tan \left ( dx+c \right ) \right ) }\sqrt{-ia} \right ) \left ( \tan \left ( dx+c \right ) \right ) ^{-{\frac{3}{2}}}{\frac{1}{\sqrt{a\tan \left ( dx+c \right ) \left ( 1+i\tan \left ( dx+c \right ) \right ) }}}{\frac{1}{\sqrt{-ia}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{i \, a \tan \left (d x + c\right ) + a} \tan \left (d x + c\right )^{\frac{5}{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.8931, size = 1257, normalized size = 7.81 \begin{align*} -\frac{2 \, \sqrt{2} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt{\frac{-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}{\left (7 \, e^{\left (6 i \, d x + 6 i \, c\right )} - 11 \, e^{\left (4 i \, d x + 4 i \, c\right )} - 15 \, e^{\left (2 i \, d x + 2 i \, c\right )} + 3\right )} e^{\left (i \, d x + i \, c\right )} + 3 \,{\left (a d e^{\left (6 i \, d x + 6 i \, c\right )} - 2 \, a d e^{\left (4 i \, d x + 4 i \, c\right )} + a d e^{\left (2 i \, d x + 2 i \, c\right )}\right )} \sqrt{-\frac{2 i}{a d^{2}}} \log \left (\frac{1}{4} \,{\left (a d \sqrt{-\frac{2 i}{a d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt{2} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt{\frac{-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}{\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right ) - 3 \,{\left (a d e^{\left (6 i \, d x + 6 i \, c\right )} - 2 \, a d e^{\left (4 i \, d x + 4 i \, c\right )} + a d e^{\left (2 i \, d x + 2 i \, c\right )}\right )} \sqrt{-\frac{2 i}{a d^{2}}} \log \left (-\frac{1}{4} \,{\left (a d \sqrt{-\frac{2 i}{a d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} - \sqrt{2} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt{\frac{-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}}{\left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}\right )}{12 \,{\left (a d e^{\left (6 i \, d x + 6 i \, c\right )} - 2 \, a d e^{\left (4 i \, d x + 4 i \, c\right )} + a d e^{\left (2 i \, d x + 2 i \, c\right )}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.27386, size = 171, normalized size = 1.06 \begin{align*} \frac{2 \, \sqrt{-2 \,{\left (i \, a \tan \left (d x + c\right ) + a\right )} a + 2 \, a^{2}} a^{3} \log \left (\sqrt{i \, a \tan \left (d x + c\right ) + a}\right )}{-\left (i - 1\right ) \,{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{5} + \left (5 i - 5\right ) \,{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{4} a - \left (9 i - 9\right ) \,{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{3} a^{2} + \left (7 i - 7\right ) \,{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{2} a^{3} - \left (2 i - 2\right ) \,{\left (i \, a \tan \left (d x + c\right ) + a\right )} a^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]